home *** CD-ROM | disk | FTP | other *** search
INSTALL Professional project | 1994-06-27 | 21.1 KB | 919 lines |
- /*
- *
- * Copyright (c) 1990-1992
- * by CompuServe Incorporated, Columbus, Ohio
- *
- * The information in this software is subject to change without
- * notice and should not be construed as a commitment by CompuServe
- * Incorporated.
- *
- */
-
- @DefineProject
- @Name = "CompuServe Information Manager"
- @Version = "2.2.3"
- @Subdir = "\\CSERVE\\"
- @OutDrive = C
- @EndProject
-
- @DefineVars
- @QString @OEMBatchName = ""
- @QString @Online = ""
- @EndVars
-
- :Start
-
- @Display
- @scrCls
-
- @Name INSTALLATION
-
- Welcome to CompuServe. This program will install version @Version
- of the @Name.
-
- You can stop the installation at any time by pressing the ESC key.
-
- @scrPause
-
- @EndDisplay
-
-
- :Install
-
- @Call HardDisk
-
- @call GetInstallDisk
-
- @Display
- @scrCls
- @EndDisplay
-
- @Position 2 4
-
- @DefineDisk
- @Label = "Original Diskette 1"
-
- @BeginLib CIM01.LIB
-
- @if ("@Online" == "")
-
- @File NEWUTIL.EXE
- @OUT5M doscim\\NEWUTIL.EXE
-
- @File TUTORIAL.BAT
- @OUT5M doscim\\TUTORIAL.BAT
-
- @File COLOR.BAT
- @OUT5M doscim\\COLOR.BAT
-
- @Endif
-
- @File CIM.MNU
- @OUT5M doscim\\NEWCIM.MNU
-
- @File CIM.ICO
- @OUT5M doscim\\CIM.ICO
-
- @File CIM.PIF
- @OUT5M doscim\\CIM.PIF
-
- @File DOSCIM.GRP
- @OUT5M doscim\\DOSCIM.GRP
-
- @File README.EXE
- @OUT5M doscim\\README.EXE
-
- /* Don't overwrite an existing quotes.dat file */
- @If (@Exists "@OutDrive:@SubDir\\support\\QUOTES.DAT")
- @Else
- @File QUOTES.DAT
- @OUT5M support\\QUOTES.DAT
- @Endif
-
- @If (20 [! @Option)
- /* Copy the new version Favorites without clobbering */
- /* the old one */
-
- @File FAVORITE.DAT
- @OUT5M support\\FAVORITE.DAN
- @Else
- /* ensure that we write out Favorites if it does not exist */
-
- @If (@Exists "@OutDrive:@SubDir\\support\\FAVORITE.DAT")
- @Else
- @File FAVORITE.DAT
- @OUT5M support\\FAVORITE.DAT
- @Endif
- @Endif
-
- @if ("@Online" == "")
- @EndLib
- @endif
- @If (@DiskSize @InDrive < 500000)
- @EndDisk
-
- @DefineDisk
- @Label = "Original Diskette 2"
- @Endif
-
- @if ("@Online" == "")
- @BeginLib CIM02.LIB
- @endif
-
- @if ("@Online" == "")
-
- @If (31 [! @Option)
- @File SIGNUP.EXE
- @Out5M doscim\\signup.exe
-
- @File signup.ICO
- @OUT5M doscim\\signup.ICO
-
- @File signup.PIF
- @OUT5M doscim\\signup.PIF
-
- @File DOSCIMS.GRP
- @OUT5M doscim\\DOSCIM.GRP
-
- @Endif
-
- @Endif
-
- @File scripts.exe
- @Out5M scripts\\scripts.exe
-
- @Endif
-
- @File MOVECIM.EXE
- @Out5M doscim\MOVECIM.EXE
-
- @File MAKEINI.EXE
- @Out5M MAKCMINI.EXE
-
- @File CIM.1
- @OUT5M doscim\\NEWCIM.EXE
-
- @if ("@Online" == "")
- @EndLib
- @endif
-
- @If (@DiskSize @InDrive < 1200000)
- @EndDisk
- /* are we installing from 360s or 720s? */
- @If (@DiskSize @InDrive < 500000)
- @DefineDisk
- @Label = "Original Diskette 3"
- @Else
- @DefineDisk
- @Label = "Original Diskette 2"
- @Endif
- @Endif
-
- @if ("@Online" == "")
- @BeginLib CIM03.LIB
- @endif
-
- @File CIM.2
- @AppendTo doscim\\NEWCIM.EXE
-
- @EndLib
-
- @EndDisk
-
- @Finish
-
- @if ("@Online" != "")
- @If (@Exists "@InputDir\\cim01.lib")
- @System "del @InputDir\\cim01.lib"
- @EndIf
- @If (@Exists "@InputDir\\install.exe")
- @System "del @InputDir\\install.exe"
- @EndIf
- @If (@Exists "@InputDir\\install.dat")
- @System "del @InputDir\\install.dat"
- @EndIf
- @If (@Exists "@InputDir\\disk.id")
- @System "del @InputDir\\disk.id"
- @EndIf
- @If (@Exists "@InputDir\\readme.now")
- @System "del @InputDir\\readme.now"
- @EndIf
- @endif
-
- /* Check if we need to write out a special batch file to invoke CIM */
-
- @if ("@OEMBatchName" != "")
- @ChDrive @OutDrive
- @ChDir "\\"
- @System "echo \@echo off > @OEMBatchName"
- @System "echo rem NOTE: This batch file needs be located >> @OEMBatchName"
- @System "echo rem in a directory specified by your >> @OEMBatchName"
- @System "echo rem PATH environment variable to work. >> @OEMBatchName"
- @System "echo @OutDrive: >> @OEMBatchName"
- @System "echo CD @Subdir\\doscim >> @OEMBatchName"
- @System "echo CIM >> @OEMBatchName"
- @Endif
-
-
- /* Write out a batch file to delete the old version of CIM */
-
- @ChDrive @OutDrive
- @ChDir "@SubDir\\scripts"
-
- /* preserve the old connect script files */
-
- @If (@Exists "CONNECT.SCR")
- @If (@Exists "CONNECT.ols")
- @System "del *.ols"
- @EndIf
-
- @System "ren *.scr *.ols"
- @EndIf
-
- /* preserve the old modem database file */
-
- @If (@Exists "MODEM.DB")
- @If (@Exists "MODEM.ODB")
- @System "del modem.odb"
- @EndIf
-
- @System "ren modem.db modem.odb"
- @EndIf
-
- /* unpack scripts and modem database */
- @Display
-
- Installation in progress ...
- @EndDisplay
-
- @System "scripts > NUL"
- @System "del scripts.exe"
-
- @ChDir "..\\support"
-
- /* preserve favorites if user got a new copy to replace the old */
- @If (@Exists "FAVORITE.DAN")
- @If (@Exists "FAVORITE.ODT")
- @System "del favorite.odt"
- @EndIf
-
- @If (@Exists "FAVORITE.DAT")
- @System "ren favorite.dat *.odt"
- @EndIf
-
- @System "ren favorite.dan *.dat"
- @EndIf
-
- @ChDir "..\\doscim"
-
- /* preserve MNU files (CIM.MNU and OLDCIM.MNU) */
-
- @If (25 [= @Option)
- @If (@Exists "NEWCIM.MNU")
- @System "del NEWCIM.MNU"
- @EndIf
-
- @Else
- @If (@Exists "OLDCIM.MNU")
- @System "del OLDCIM.MNU"
- @EndIf
-
- @If (@Exists "CIM.MNU")
- @System "ren CIM.MNU OLDCIM.MNU"
- @EndIf
-
- @If (@Exists "NEWCIM.MNU")
- @System "ren NEWCIM.MNU CIM.MNU"
- @EndIf
-
- @Endif
-
- /* preserve CIM EXE files (CIM.EXE and OLDCIM.EXE) */
-
- @If (@Exists "OLDCIM.EXE")
- @System "del OLDCIM.EXE"
- @EndIf
-
- @If (@Exists "CIM.EXE")
- @System "ren CIM.EXE OLDCIM.EXE"
- @EndIf
-
- /* Create a "yes" response file and unpack the self-extracting exe's */
- @System "echo y > yes"
- @System "echo y >> yes"
- @System "echo y >> yes"
- @System "echo y >> yes"
- @System "echo y >> yes"
- @System "echo y >> yes"
- @System "echo y >> yes"
- @System "echo y >> yes"
- @System "echo y >> yes"
- @System "echo y >> yes"
- @System "echo y >> yes"
- @System "echo y >> yes"
- @System "echo y >> yes"
- @System "echo y >> yes"
- @System "echo y >> yes"
-
- @If (@Exists "NEWCIM.EXE")
- /* unpack cim */
- @Display
-
- Installation in progress. Please stand by ...
- @EndDisplay
- @System "newcim < yes > NUL"
- @System "del newcim.exe"
- @EndIf
-
- @Display
-
- Installation in progress ...
- @EndDisplay
-
- @If (@Exists "NEWUTIL.EXE")
- @System "NEWUTIL < yes > NUL"
- @System "del NEWUTIL.EXE"
- @EndIf
-
- @If (@Exists "SIGNUP.EXE")
- @System "SIGNUP < yes > NUL"
- @System "del SIGNUP.EXE"
- @If (@Exists "SIGNUP.DAT")
- @System "del SIGNUP.DAT"
- @EndIf
- @EndIf
-
- @system "README < yes > NUL"
- @system "del README.EXE"
- @System "del yes"
-
- @System "echo \@echo off > DELOLCIM.BAT"
- @System "echo echo This batch file will delete your old version of the >> DELOLCIM.BAT"
- @System "echo echo COMPUSERVE INFORMATION MANAGER software. If you do >> DELOLCIM.BAT"
- @System "echo echo NOT wish to proceed, press CTRL+C or CTRL+BREAK now, >> DELOLCIM.BAT"
- @System "echo echo followed by the letter 'Y'. >> DELOLCIM.BAT"
- @System "echo echo . >> DELOLCIM.BAT"
- @System "echo pause >> DELOLCIM.BAT"
- @System "echo del oldcim.exe >> DELOLCIM.BAT"
- @System "echo del cim01.ovl >> DELOLCIM.BAT"
- @System "echo del cim02.ovl >> DELOLCIM.BAT"
- @System "echo del cim.cfg >> DELOLCIM.BAT"
- @System "echo del ..\\scripts\\*.ols >> DELOLCIM.BAT"
- @System "echo del ..\\scripts\\*.odb >> DELOLCIM.BAT"
-
-
- @ChDir ".."
-
- /* Create a new CIS.INI if we don't have one already and if an old CIM.CFG */
- /* file exists */
-
- @If (@Exists "CIM.CFG")
- @if (@Exists "CIS.INI")
- /* do nothing */
- @else
- @System "MAKCMINI > NUL"
- @EndIf
- @EndIf
- @System "del MAKCMINI.EXE > NUL"
-
- @ChDir ".\\scripts"
-
- @if (@Exists "CONNECT.OLS")
- @Display
- @scrCls
-
- The latest versions of the CompuServe Information Manager's
- connect script files have been installed into the Script
- subdirectory. Existing files with the '.SCR' extension were
- detected and have been renamed with the extension '.OLS'. Any
- existing 'MODEM.DB' file has been renamed with the extension
- '*.ODB'. If you customized any of the old files, you will
- have to make the same changes to the new scripts and modem
- database.
-
- @scrPause
-
- @EndDisplay
- @Endif
-
- @ChDir "..\\doscim"
-
- @Display
-
- @scrCLS
-
- Installation Completed!
-
- The CompuServe Information Manager has been successfully installed.
-
- You can start the Information Manager from a DOS prompt by changing
- to the @OutDrive:@CIMDIR directory and then typing the command:
-
- CIM
-
- @scrPause
-
- @EndDisplay
-
- @Goto Finish
-
- @EndFinish
-
- /*
- * Now we need to handle an abort from the installation, the user has
- * chosen to return to DOS, so we perform the abort and terminate the
- * application.
- */
-
- :NoMoveExit
- @Display
- @scrCLS
-
- You have chosen to end the installation without converting to the
- new subdirectory organization. CIM.EXE will now be accessible in
- the DOSCIM subdirectory, which is subordinate to the directory
- where you installed this version of the CompuServe Information
- Manager.
-
- Note to DOSCIM users installing over a version prior to 2.1:
-
- The contents of your "old" Filing Cabinet will not be
- available in this version until you convert to the new
- subdirectory organization. To do the conversion from DOS,
- run MOVECIM.EXE.
-
- If you file any messages with the newly installed version of
- CIM, RUNNING MOVECIM will overwrite these messages with the
- contents of your older Filing Cabinet. For this reason,
- we strongly recommend that you run MOVECIM.EXE before using
- the new version of CIM.
-
- @scrPause
- @EndDisplay
-
-
- :NormalExit
- @Display
- @scrCLS
-
- @Name setup completed!
-
- Press ENTER to return to DOS.
-
- @scrPause
- @EndDisplay
-
-
-
- :Abort
- @Exit
-
-
- /*
- * Now we need to define the code necessary to handle the various types
- * of installations. The first is the hard disk installation, where we
- * need to obtain the drive and the directory. Here we need to verify
- * that enough disk storage exists to complete the installation.
- */
-
- :HardDisk
-
- @FixedDisk = (1)
-
- @GetOutDrive
- @SetColor Black Grey
- @Supress A
- @Supress B
- @scrCLS
-
- The menu below lists all of your hard disk drives. Select the drive on
- which you want to install the CompuServe Information Manager and press
- ENTER to continue. If you have only one disk drive press ENTER.
-
- On the next screen you will be prompted for the installation directory.
-
-
- @EndOutDrive
- @Position 8 1
-
- @If (@DiskFree @OutDrive < 2000000)
- @GetOption
- @scrCLS
-
- The CompuServe Information Manager can only be installed on a hard
- drive with 2,000,000 or more bytes of free disk. You may exit to
- free more disk space or select another drive to receive the program.
-
- Your drive @OutDrive: has only @DiskFree @OutDrive bytes available.
-
- @SetColor Black Grey
- @Position 14 1
- @Option 90 = " Select New Drive "
- @Option 92 = " Return to DOS "
- @EndOption
-
- @If (90 [= @Option)
- @Goto HardDisk
- @Endif
- @Goto Abort
- @Else
- @Display
- @scrCLS
- @EndDisplay
-
- @GetSubdir
- The CompuServe Information Manager will be installed on the @OutDrive: drive
- in a subdirectory called DOSCIM, which will be created by default under
- the directory CSERVE (see diagram). The new directory structure outlined
- below will allow you to use common data contained in the Filing Cabinet,
- In Basket, Address Book, and Session Settings with other CompuServe
- communications software programs such as the CompuServe Information
- Manager for Windows (WinCIM).
-
- C:\CSERVE\
- ├──── DOSCIM DOS CIM executables & help, Browse menu
- ├──── SCRIPTS Script files, modem database
- ├──── FCABINET Filing Cabinet, In Basket, Out Basket
- ├──── SUPPORT Support files (*.DAT)
- ├──── DOWNLOAD Default download subdirectory
- └──── GIF Default GIF download subdirectory
-
- To choose a directory other than CSERVE, edit the path listed below.
- Be sure to include the complete directory path, omitting the drive name.
-
- @Prompt = " @Name Directory "
- @Position 20 6
- @EndSubdir
-
- @DefineVars
- @QString @CIMDIR = "@Subdir\\DOSCIM"
- @EndVars
-
- @Endif
-
-
-
- @If (@GoodSubDir != 1)
- @GetOption
- @scrCLS
-
-
-
- You do not appear to have full read/write access to the drive and
- directory specified, which is required for installation.
-
- @SetColor Black Grey
- @Position 10 1
- @Option 93 = " Select New Drive "
- @Option 94 = " Return to DOS "
- @EndOption
-
- @If (93 [= @Option)
- @Goto HardDisk
- @Endif
- @Goto Abort
- @Endif
-
-
-
- @Position 10 1
- @GetOption
- @scrCLS
-
- The CompuServe Information Manager will be installed
- under the following directory:
-
- @OutDrive:@SubDir
- @Position 8 1
- @SetColor Black Grey
- @Option 90 = " Continue the Installation "
- @Option 89 = " Change Drive or Directory "
- @Option 91 = " Return to DOS "
- @EndOption
-
- @If (89 [= @Option)
- @Goto HardDisk
- @Elseif (91 [= @Option)
- @Goto Abort
- @Endif
-
- @Call Exists
-
- @Return
-
- /*
- * Now we need to determine if the user is already a member or if they
- * want to sign up a new account. If they are already a member we just
- * return. Otherwise we run CIMUTIL in signup mode.
- */
-
- :Signup
-
- @ChDrive @OutDrive
- @ChDir "@CIMDIR"
-
- @Call Wait
- @If (@VideoCard == 'M')
- @Execute "CIMUTIL.EXE", "-NOEMM -SIGNUP -MONO"
- @Goto Signup_Err1
- @Else
- @Execute "CIMUTIL.EXE", "-NOEMM -SIGNUP"
- @Goto Signup_Err2
- @Endif
-
- @Return
-
- :MoveFiles
-
- @ChDrive @OutDrive
- @ChDir "@CIMDIR"
-
- @Call Wait
- @Execute "MOVECIM", "@SubDir @SubDir"
- @Goto Move_Err1
-
- @Return
-
- :GetInstallDisk
-
- @Display
- @scrCLS
- @If (@DiskSize @InDrive < 5000000)
- @If (@Exists "@Indrive:CIM01.LIB")
- @Else
-
- Please re-insert the disk labelled
-
- Original Diskette 1
-
- into the @InDrive: Drive.
-
- @scrPause
- @EndDisplay
- @goto GetInstallDisk
- @Endif
- @Endif
- @Enddisplay
- @Return
-
- /*
- * Now we need to put together a small routine to display the please
- * wait message for during the time we are spawning to another program.
- * This is because the spawn can take a while.
- */
-
- :Wait
- @Display
- @scrCLS
- @Position 10 30 Please Wait ...
- @EndDisplay
- @Return
-
- /*
- * Now we need to determine if the application is already installed
- * or if this is the first time we are installing this application in
- * this directory.
- */
-
- :Exists
-
- @Display
- @scrCLS
- @EndDisplay
-
- @if (@Exists "@OutDrive:@SubDir\\support\\favorite.dat")
- @GetOption
-
- A previous version of the Favorite Places database exists in your
- support directory. You can keep this file or replace it with a
- new Favorite Places supplied with this version of CIM.
-
- @SetColor Black Grey
- @Option 20 = "Save Your Favorite Places"
- @Option 21 = " Use New Favorite Places "
- @Option 22 = " Return to DOS "
- @EndOption
-
- @if (22 [= @Option)
- @Goto Abort
- @Endif
- @Position 5 1
- @Endif
-
- @if (@Exists "@OutDrive:@SubDir\\doscim\\cim.mnu")
- @GetOption
- @scrCls
-
- The installation program has detected an existing CIM.MNU file.
- If you are using a custom edition of DOSCIM, be aware that the
- CIM.MNU file may contain customized information and that using
- the CIM.MNU file included with this upgrade will cause this
- customized information to be lost. If you are not using a custom
- edition of DOSCIM, you should allow the existing CIM.MNU file to
- be replaced. This will ensure that you obtain any updated
- features controlled by this file. NOTE: if you do replace your
- existing CIM.MNU file, it will not be lost. The install program
- will rename it to OLDCIM.MNU so you may be able to recover the
- file if necessary.
-
- @SetColor Black Grey
- @Default (2)
- @Option 25 = "Save Your Browse and Services Menus"
- @Option 26 = " Use New Browse and Services Menus "
- @Option 27 = " Return to DOS "
- @EndOption
-
- @if (27 [= @Option)
- @Goto Abort
- @Endif
- @Position 5 1
- @Endif
-
- @if ("@Online" == "")
-
- @GetOption
- @scrCls
-
- If you are already a CompuServe member and do not plan to create
- a new CompuServe account, you do not need to copy the Signup files to
- your disk drive. If you would like to become a member, or setup a
- new account, these files are required.
-
- @If (@Exists "@OutDrive:@SubDir\\DOSCIM\\CIM.EXE")
- @Default (2)
- @Endif
-
- @If (@Exists "@OutDrive:@SubDir\\CIM.EXE")
- @Default (2)
- @Endif
-
- @SetColor Black Grey
- @Option 30 = " Copy the Signup Files "
- @Option 31 = " Do not Copy the Signup Files "
- @Option 32 = " Return to DOS "
- @EndOption
-
- @If (32 [= @Option)
- @Goto Abort
- @Endif
-
- @Endif
-
- @Return
-
- /*
- * Now we are ready to finish up, in this case the user has installed
- * the Information manager.
- */
-
- :Finish
-
- @if (30 [= @Option)
-
- @GetOption
- @scrCls
-
- If you have not previously accessed CompuServe, you should first
- sign up a new membership. To do this, you will need your new
- agreement number and serial number which you can find in your
- accompanying documentation.
-
- You can begin the sign up process by selecting "Sign Up a New
- Membership" below, or by typing
-
- SIGNUP
-
- from a DOS prompt in the @OutDrive:@CIMDIR directory.
-
- @SetColor Black Grey
- @Option 51 = " Sign Up a New Membership "
- @Option 71 = " Return to DOS "
- @EndOption
-
- @If (71 [= @Option)
- @Goto NormalExit
- @Elseif (51 [= @Option)
- @Goto Signup
- @Endif
-
- @ElseIf (@Exists "@OutDrive:@SubDir\\CIM.EXE")
- @If (@Exists "@OutDrive:@SubDir\\FAVORITE.DAT")
- /* Installed over top an older version of CIM */
- /* Present option of using old data files and filing cabinet */
-
- @GetOption
- @scrCls
-
- The version of the CompuServe Information Manager (CIM) that
- you are installing utilizes a new subdirectory organization.
- This new organization allows other CompuServe communications software
- for DOS machines to share Filing Cabinet, In Basket, Out Basket,
- Connect scripts, and other data files with DOS CIM.
-
- We strongly recommend that you reorganize your DOS CIM files now
- by selecting REORGANIZE FILES below. Otherwise, you will not be
- able to access the contents of your existing Filing Cabinet, Address
- Book, and other data files.
-
-
-
- @SetColor Black Grey
- @Option 52 = " Reorganize Files "
- @Option 72 = " End Installation "
- @EndOption
-
- @If (72 [= @Option)
- @Goto NoMoveExit
- @Elseif (52 [= @Option)
- @Goto MoveFiles
- @Endif
-
- @EndIf
-
- @ElseIf ("@Online" != "")
- @Display
- @scrCls
-
- If you were using a version of CIM prior to 2.1 and want to use the
- contents of your old Filing Cabinet, Address Book, Favorite Places,
- and other data files, please read the contents of README.TXT in
- the DOSCIM subdirectory.
-
- @scrPause
- @EndDisplay
-
- @EndIf
-
- @Goto Abort
-
- :Signup_Err1
-
- @Display
- @scrCls
-
- The install program was unable to run the Signup program directly
- due to your system configuration.
-
- In order to sign up with CompuServe, please enter the following
- command exactly as it appears at the dos command line:
-
-
- CIMUTIL -SIGNUP -MONO
-
-
-
- Press ENTER to return to DOS.
-
- @scrPause
- @EndDisplay
- @Exit
-
-
- :Signup_Err2
-
- @Display
- @scrCls
-
- The install program was unable to run the Signup program directly
- due to your system configuration.
-
- In order to sign up with CompuServe, please enter the following
- command exactly as it appears at the dos command line:
-
-
- CIMUTIL -SIGNUP
-
-
-
- Press ENTER to return to DOS.
-
- @scrPause
- @EndDisplay
-
- @Exit
-
- :Move_Err1
-
- @Display
- @scrCls
-
- The install program was unable to run the Movecim program directly
- due to your system configuration.
-
- In order to reorganize your files to use the new directory structure,
- please enter the following command exactly as it appears at the
- dos command line:
-
-
- MOVECIM @SubDir @SubDir
-
-
-
- Press ENTER to return to DOS.
-
- @scrPause
- @EndDisplay
- @Exit
-